﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5shiv.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<![endif]-->
<link href="../static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="../static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="../static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="../lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>图书管理系统</title>
</head>
<body>
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="loginWraper">
  <div id="loginform" class="loginBox" style="height: 350px; width: 500px">
    <h4 style="text-align: center; font-weight: bold; font-size: 20px;">连锁书店管理系统</h4>
    <form class="form form-horizontal" action="adminLogin" method="post" id="myForm">

      <div class="row cl">
        <label class="form-label col-xs-2"><i class="Hui-iconfont">&#xe60d;</i></label>
        <div class="formControls col-xs-8">
          <input name="userName" type="text" placeholder="用户名" class="input-text size-L" autocomplete="off">
        </div>
      </div>

      <div class="row cl">
        <label class="form-label col-xs-2"><i class="Hui-iconfont">&#xe60e;</i></label>
        <div class="formControls col-xs-8">
          <input name="password" type="password" placeholder="密码" class="input-text size-L" autocomplete="new-password">
        </div>
      </div>

      <div class="row cl" style="text-align: center">
        <div>
          <label style="font-size: 16px"><input type="radio" value="admin" name="type" checked>&nbsp;管理员</label>
<%--          <label style="font-size: 16px"><input type="radio" value="user" name="type" style="margin-left: 15px;">&nbsp;顾客</label>--%>
        </div>
      </div>

      <div class="row cl">
        <div class="formControls col-xs-9 col-xs-offset-3" style="margin-left: 29%">
          <c:if test="${sessionScope.msg != null}">
            <p style="color: red;">${sessionScope.msg}</p>
          </c:if>
          <input name="" type="button" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;" id="subBtn">
          <input name="" type="button" onclick="window.location.href = '../system/toRegisterPage'" class="btn btn-default radius size-L"
                 style="margin-left: 15px" value="&nbsp;注&nbsp;&nbsp;&nbsp;&nbsp;册&nbsp;">
        </div>
      </div>
    </form>
  </div>
</div>
<div class="footer">Copyright &copy; He Hengjia Rights Reserved.</div>
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>

<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();

$("#subBtn").click(function() {
  // 验证数据是否为空
  let password = $("input[name='password']").val();
  let userName = $("input[name='userName']").val();
  let type = $("input[type='radio']:checked").val();
  if(!password || !userName) {
    layer.msg("请填写登录信息！", {
      icon: 7,
      time: 1500
    })
    return;
  }
  $("#myForm").submit();
})
</script>
</body>
</html>